package com.sz.biz.common.contract.service;

import com.sz.biz.common.contract.entity.ContField;
import com.sz.biz.common.contract.dto.ContFieldDto;

import java.util.List;
import java.util.Map;

/**
 * Package: com.sz.biz.common.contract.service<br>
 * Function: 合同的field service
 * Author: yanhong.xiao.<br>
 * Date: 2017-07-19 16:15:00.
 */
public interface ContFieldService {
    /**
     * 批量保存field
     * @param fieldDtoList
     */
    void batchSave(List<ContFieldDto> fieldDtoList);

    /**
     * 根据类型删除对应relIds的field
     * @param contTypeEnum
     * @param relIds
     */
    void batchDeleteByRelIds(ContTypeEnum contTypeEnum, List<Integer> relIds);

    /**
     * 根据relId获取field
     * @param contTypeEnum
     * @param relId
     * @return
     */
    List<ContField> getFieldsByRelId(ContTypeEnum contTypeEnum, Integer relId);


    Map<String,String> getFields(ContTypeEnum contTypeEnum, Integer relId);

    List<ContField> getFieldsByRelIds(ContTypeEnum contTypeEnum, List<Integer> relIds);

    Map<Object,Map<String,String>> getFieldrDtos(List<ContField> fieldList);


}
